package com.bc.trade.model;

import com.bc.common.basemodel.BaseMerch;
import com.bc.trade.config.R;
import com.fs.common.util.FSJedis;

@SuppressWarnings("serial")
public class Merch extends BaseMerch<Merch> {
	public static final Merch dao = new Merch().dao();
	
	public Merch selectFromRedis(String merchCode) {
		if (R.IS_REDIS) {
			return FSJedis.get(R.RK_MERCH, merchCode, Merch.class);
		} else {
			return dao.findFirst("SELECT * FROM bd_merch WHERE code=?", merchCode);
		}
	}
	
}
